package cn.hdu.liang.innerclasses;

import cn.hdu.liang.innerclasses.controller.Event;

public class GreenhouseController {
    public static void main(String[] args) {
        GreenhouseControls gc = new GreenhouseControls();
        gc.addEvent(gc.new Bell(900));
        Event[] eventList = {
                gc.new ThermostatNight(0),
                gc.new LightOn(1000),
                gc.new LightOff(2000),
                gc.new WaterOn(3000),
                gc.new WaterOff(4000),
                gc.new ThermostatDay(7000)
        };

        gc.addEvent(gc.new Restart(10000, eventList));
        gc.addEvent(new GreenhouseControls.Terminate(new Integer(25000)));
        gc.run();
    }
}
